﻿ using System.Linq;
using AdventureWorks.Domain;
using AdventureWorks.DataAccess.Utils;
using NHibernate.Linq;
using NHibernate;
namespace AdventureWorks.DataAccess.repository
{
    public class PersonRepository : BaseRepository<Person>, IPersonRepository
    {

        public IQueryable<Person> GetPersonByFullName(ISession session, string firstName, string lastName)
        {
                return session.Query<Person>()
                    .Where(x => x.FirstName == firstName)
                    .Where(x => x.LastName == lastName);
        }

    }
}
